package cn.kbyue.adminclientdemo.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.concurrent.TimeUnit;

/**
 * @author xlang
 * @date 2023/4/4 14:46
 */
@Slf4j
@Service
public class PrintScheduled {

    @Scheduled(cron = "0/10 * * * * ?")
    public void printTask() {
        log.info("[{}] task run...", LocalDateTime.now());
    }

}
